home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Classes / 2.0_nxyPalette1.2 / src / NXYView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-26  |  3.2 KB  |  126 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import <appkit/View.h>
  5. #import <appkit/Application.h>
  6. #import <appkit/PrintInfo.h>
  7. #import <dpsclient/wraps.h>
  8. #import <appkit/Font.h>
  9.  
  10. #define LINEAR 0
  11. #define LOG 1
  12.  
  13. @interface NXYView:View
  14. {
  15.     id      plotParam;
  16.     id plotInspectorPanel;        //Outlet to bring up Inspector panel with right mouse click in view
  17.     id inspector; 
  18.     id delegate;   
  19.     
  20.     float ppxunit, ppyunit;    /* pixels per xunit, pixels per y unit */
  21.  
  22. //    float xlegend[2], **ylegend;/* for legend drawing (fixed dimension here) */
  23. //    BOOL  drawingLegendLines;
  24. //    NXRect legendbox;
  25.  
  26. // Instance variables added by Charlie
  27.     char * mainTitle;
  28.     char * xaxisLabel;
  29.     char * yaxisLabel;    
  30.     float xInc;
  31.     float xMin;
  32.     float xMax;
  33.     float yInc;
  34.     float yMin;
  35.     float yMax;
  36.     int gridState;
  37.     int borderState;
  38.     int autoMaxMinState;
  39.     int autoPaperState;
  40.     int xLinLogState;
  41.     int yLinLogState;
  42.     int paperSwitchRow;
  43.     int logoFlag;
  44. }   
  45.  // methods for obtaining values from the Inspector
  46.  -setGrid:(int)grid_state;
  47. - setBorder:(int)border_state;
  48. -(int)gridState;
  49. -(int)borderState;
  50. -setAutoMaxMinState:(int)state;
  51. -(int)autoMaxMinState;
  52. -setAutoPaperState:(int)state;
  53. -(int)autoPaperState;
  54. -setXLinLogState:(int)state;
  55. -(int)xLinLogState;
  56. -setYLinLogState:(int)state;
  57. -(int)yLinLogState;
  58. -setPaperSwitchRow:(int)state;
  59. -(int)paperSwitchRow;
  60. -setLogoFlag:(int)state;
  61. -(int)logoFlag;
  62. -setMainTitle:(char *)mainTITLE;
  63. -setXaxisLabel:(char *)xAxisLabel;
  64. -setYaxisLabel:(char *)yAxisLabel;
  65. -(char *)mainTitle;
  66. -(char *)xaxisLabel;
  67. -(char *)yaxisLabel;
  68. -setXincValue:(float)passedValue;
  69. -setXminValue:(float)passedValue;
  70. -setXmaxValue:(float)passedValue;
  71. -setYincValue:(float)passedValue;
  72. -setYminValue:(float)passedValue;
  73. -setYmaxValue:(float)passedValue;
  74. -(float)xIncValue;
  75. -(float)xMinValue;
  76. -(float)xMaxValue;
  77. -(float)yIncValue;
  78. -(float)yMinValue;
  79. -(float)yMaxValue;
  80. - rightMouseDown:(NXEvent *)theEvent;
  81.  
  82.  
  83. - clear:sender;
  84. - clearNXYView:sender;  // Added to clear the view from an external action
  85. - initPlot:sender;
  86. - setDrawColor:(float) color;
  87. - drawLines:sender :(BOOL)xaxislog :(BOOL)yaxislog;
  88. - drawTicMarks:(float)xmin :(float)xmax :(float)ymin :(float)ymax;
  89. - doPrinting:sender;
  90. - copyToPasteboard:sender;     // Copy EPS to pasteboard
  91. //- (NXCoord *)xdata;        /* provide data for drawing the curves */
  92. //- (NXCoord **)ydata;        /* and symbols in the legend box       */
  93. - (int)nPoints;            /* provide no. of points to use in legend drawing */
  94.  
  95. // Any subclass of View needs to implement its own drawSelf method
  96. - drawSelf: (const NXRect *)rects :(int)rectCount;
  97. - initFrame:(NXRect *)frameRect;
  98.  
  99. /*
  100.  * We implement the mouseDown method to allow zooming and also to allow
  101.  * moving the legend box.  We lean heavily on the code in the
  102.  * /NextDeveloper/Examples/Mandelbrot directory.
  103.  */
  104. //Added to plot from a stream sent by a Controller for the view
  105. //-plotDataFromStream:(NXStream *)dataStream;
  106. -plotDataFromStream:sender;
  107. - (const char *)inspectorName;    // For palette inspector
  108. - setInspector:anObject;
  109. -setDelegate:anObject;
  110.  
  111. // Added from version 1.7 of nxyplot:
  112. - saveEPS:sender;
  113. - savePSCode:(char *)aFile;
  114.  
  115. // For archiving instance variables
  116. - read:(NXTypedStream *)stream;
  117. - write:(NXTypedStream *)stream;
  118.  
  119. @end
  120.  
  121.  
  122. @interface  Object(NXYViewDelegate)
  123.  
  124. -nxyView:sender provideDataStream:(NXStream **)dataStream;
  125.  
  126. @end